package cn.arikeky.feignclient;

import cn.arikeky.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
// 指定需要调用的服务的应用名称  工厂方式
@FeignClient(name = "user-server", fallbackFactory = GetByIdFallbackFactory.class)
// 普通方式
//@FeignClient(name = "user-server", fallback = UserFallback.class)
public interface UserFeignClient {


    @GetMapping("/user/{id}")
    User getById(@PathVariable("id") Long id);


}